package fr.ajicommerce.managedBean;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("clientBean")
@Scope("request")
public class ClientBean {

	private int civilite;
	private String nom;
	private String prenom;
	private String motDePasse1;
	private String motDePasse2;
	
	public int getCivilite() {
		return civilite;
	}

	public void setCivilite(int civilite) {
		this.civilite = civilite;
	}
	
	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getMotDePasse1() {
		return motDePasse1;
	}

	public void setMotDePasse1(String motDePasse1) {
		this.motDePasse1 = motDePasse1;
	}

	public String getMotDePasse2() {
		return motDePasse2;
	}

	public void setMotDePasse2(String motDePasse2) {
		this.motDePasse2 = motDePasse2;
	}

	// TODO a renforcer
	public boolean verification() {
		boolean res = (motDePasse1 != null && motDePasse1.equals(motDePasse2));
		return res;
	}

	@Override
	public String toString() {
		return "ClientBean [civilite=" + civilite + ", nom=" + nom
				+ ", prenom=" + prenom + ", motDePasse1=" + motDePasse1
				+ ", motDePasse2=" + motDePasse2 + "]";
	}

}
